Skip to content

chore: Add --fetch option to list commands#979

Open
rsenden wants to merge 3 commits intodev/v3.xfrom
feat/v3.x/fetch-option
Open

chore: Add --fetch option to list commands#979
rsenden wants to merge 3 commits intodev/v3.xfrom
feat/v3.x/fetch-option

Conversation

@rsenden
Copy link
Copy Markdown
Contributor

@rsenden rsenden commented Apr 17, 2026

feat: `fcli fod * list`: Add `--fetch` option on most `list` commands to fetch subset of records from FoD

feat: `fcli ssc * list`: Add `--fetch` option on most `list` commands to fetch subset of records from SSC

feat: `fcli sc-sast * list`: Add `--fetch` option on some `list` commands that utilize SSC REST endpoints to fetch subset of records from SSC

feat: `fcli sc-dast * list`: Add `--fetch` option on most `list` commands to fetch subset of records from ScanCentral DAST

feat: fcli `--style` option: Add `[no-]envelope` style for various output formats like JSON and YAML to allow for outputting paging and potentially other metadata

feat: fcli action framework: Emit `<key>.metadata` variable on `run.fcli` instructions to allow actions to access paging and potentially other metadata produced by the fcli command

feat: `fcli fod * list`: Add `--fetch` option on most `list` commands to fetch subset of records from FoD

feat: `fcli ssc * list`: Add `--fetch` option on most `list` commands to fetch subset of records from SSC

feat: `fcli sc-sast * list`: Add `--fetch` option on some `list` commands that utilize SSC REST endpoints to fetch subset of records from SSC

feat: `fcli sc-dast * list`: Add `--fetch` option on most `list` commands to fetch subset of records from ScanCentral DAST
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a cross-cutting --fetch option to many list commands across FoD/SSC/ScanCentral modules to allow fetching a specific slice of records from server-side results, without iterating through full API paging.

Changes:

  • Introduces a common FetchRange model + --fetch parsing/conversion and a reusable AbstractFetchRangeMixin (request updater + paging suppressor).
  • Updates the request execution pipeline to allow suppressing paging when a command indicates paging should be disabled (for --fetch and existing --no-paging).
  • Wires product-specific fetch-range mixins into many list commands and removes hardcoded paging params (limit=100) where they would conflict.

Reviewed changes

Copilot reviewed 52 out of 52 changed files in this pull request and generated no comments.

Show a summary per file
File Description
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/variable/cli/cmd/SSCVariableListCommand.java Adds SSC --fetch mixin to variable history listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/variable/cli/cmd/SSCVariableDefinitionListCommand.java Adds SSC --fetch mixin to variable definition listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/system_state/cli/cmd/SSCStateRulepackListCommand.java Adds SSC --fetch mixin to rulepack listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/system_state/cli/cmd/SSCStateJobListCommand.java Adds SSC --fetch mixin to job listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/system_state/cli/cmd/SSCStateEventListCommand.java Adds SSC --fetch mixin; removes hardcoded limit=100 from base request.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/system_state/cli/cmd/SSCStateActivitiesListCommand.java Adds SSC --fetch mixin to activities listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/report/cli/cmd/SSCReportTemplateListCommand.java Adds SSC --fetch mixin to report template listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/report/cli/cmd/SSCReportListCommand.java Adds SSC --fetch mixin to report listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/plugin/cli/cmd/SSCPluginListCommand.java Adds SSC --fetch mixin; removes hardcoded limit=100 from base request.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/performance_indicator/cli/cmd/SSCPerformanceIndicatorListCommand.java Adds SSC --fetch mixin to performance indicator listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/performance_indicator/cli/cmd/SSCPerformanceIndicatorDefinitionListCommand.java Adds SSC --fetch mixin to performance indicator definition listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue_template/cli/cmd/AbstractSSCIssueTemplateListCommand.java Adds SSC --fetch mixin to common issue-template listing base.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue/cli/cmd/SSCIssueListCommand.java Adds SSC --fetch mixin; removes hardcoded limit=100 from issues base request.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/issue/cli/cmd/SSCIssueFilterSetListCommand.java Adds SSC --fetch mixin to filter set listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/attribute/cli/cmd/SSCAttributeDefinitionListCommand.java Adds SSC --fetch mixin; removes hardcoded limit=100 from base request.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/artifact/cli/cmd/SSCArtifactListCommand.java Adds SSC --fetch mixin to artifact listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/appversion/cli/cmd/SSCAppVersionListCommand.java Adds SSC --fetch mixin; removes hardcoded limit=100 from base request.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/app/cli/cmd/SSCAppListCommand.java Adds SSC --fetch mixin to application listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/alert/cli/cmd/SSCAlertListCommand.java Adds SSC --fetch mixin to alert listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/alert/cli/cmd/SSCAlertDefinitionListCommand.java Adds SSC --fetch mixin to alert definition listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/cli/cmd/SSCUserListCommand.java Adds SSC --fetch mixin to user listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/cli/cmd/SSCTokenDefinitionListCommand.java Adds SSC --fetch mixin to token definition listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/cli/cmd/SSCRoleListCommand.java Adds SSC --fetch mixin to role listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/cli/cmd/SSCPermissionListCommand.java Adds SSC --fetch mixin to permission listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/access_control/cli/cmd/SSCAppVersionUserListCommand.java Adds SSC --fetch mixin to app-version user listing.
fcli-core/fcli-ssc/src/main/java/com/fortify/cli/ssc/_common/cli/mixin/SSCFetchRangeMixin.java SSC-specific mapping of fetch range to start/limit query params.
fcli-core/fcli-sc-sast/src/main/java/com/fortify/cli/sc_sast/scan/cli/cmd/SCSastScanListCommand.java Adds SSC --fetch mixin to ScanCentral SAST scan listing (SSC endpoint).
fcli-core/fcli-sc-dast/src/main/java/com/fortify/cli/sc_dast/sensor/cli/cmd/SCDastSensorListCommand.java Adds SC-DAST --fetch mixin to sensor listing.
fcli-core/fcli-sc-dast/src/main/java/com/fortify/cli/sc_dast/scan_settings/cli/cmd/SCDastScanSettingsListCommand.java Adds SC-DAST --fetch mixin to scan settings listing.
fcli-core/fcli-sc-dast/src/main/java/com/fortify/cli/sc_dast/scan/cli/cmd/SCDastScanListCommand.java Adds SC-DAST --fetch mixin to scan listing.
fcli-core/fcli-sc-dast/src/main/java/com/fortify/cli/sc_dast/_common/cli/mixin/SCDastFetchRangeMixin.java SC-DAST-specific mapping of fetch range to offset/limit query params.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/report/cli/cmd/FoDReportTemplateListCommand.java Adds FoD --fetch mixin to report template listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/report/cli/cmd/FoDReportListCommand.java Adds FoD --fetch mixin to report listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/release/cli/cmd/FoDReleaseScanListCommand.java Adds FoD --fetch mixin to release scan listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/release/cli/cmd/FoDReleaseListCommand.java Adds FoD --fetch mixin to release listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/microservice/cli/cmd/FoDMicroserviceListCommand.java Adds FoD --fetch mixin to microservice listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/issue/cli/cmd/FoDIssueListCommand.java Adds FoD --fetch mixin and blocks --fetch with --app (requires single release).
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/attribute/cli/cmd/FoDAttributeListCommand.java Adds FoD --fetch mixin to attribute listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/app/cli/cmd/FoDAppScanListCommand.java Adds FoD --fetch mixin to app scan listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/app/cli/cmd/FoDAppListCommand.java Adds FoD --fetch mixin to app listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/access_control/cli/cmd/FoDUserListCommand.java Adds FoD --fetch mixin to user listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/access_control/cli/cmd/FoDRoleListCommand.java Adds FoD --fetch mixin to role listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/access_control/cli/cmd/FoDGroupListCommand.java Adds FoD --fetch mixin to group listing.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/scan/cli/cmd/AbstractFoDScanListCommand.java Adds FoD --fetch mixin at shared scan-list base class.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/cli/mixin/FoDFetchRangeMixin.java FoD-specific mapping of fetch range to offset/limit query params.
fcli-core/fcli-common/src/test/java/com/fortify/cli/common/rest/paging/FetchRangeTest.java Adds unit tests for parsing/validation of --fetch values.
fcli-core/fcli-common/src/main/java/com/fortify/cli/common/rest/paging/IPagingSuppressor.java Introduces a small contract for disabling paging in the request producer.
fcli-core/fcli-common/src/main/java/com/fortify/cli/common/rest/paging/FetchRangeConverter.java Implements [<start>-]<end> parsing into FetchRange.
fcli-core/fcli-common/src/main/java/com/fortify/cli/common/rest/paging/FetchRange.java Adds a record representing (offset, limit) for fetch slicing.
fcli-core/fcli-common/src/main/java/com/fortify/cli/common/rest/cli/mixin/AbstractFetchRangeMixin.java Adds --fetch option, request update behavior, and hardcoded-paging guard.
fcli-core/fcli-common/src/main/java/com/fortify/cli/common/rest/cli/cmd/AbstractRestCallCommand.java Integrates paging suppression with existing --no-paging behavior.
fcli-core/fcli-common/src/main/java/com/fortify/cli/common/json/producer/RequestObjectNodeProducer.java Implements paging suppression (single request) when requested by command/mixins.

rsenden added 2 commits April 17, 2026 17:54
feat: fcli `--style` option: Add `[no-]envelope` style for various output formats like JSON and YAML to allow for outputting paging and potentially other metadata

feat: fcli action framework: Emit `<key>.metadata` variable on `run.fcli` instructions to allow actions to access paging and potentially other metadata produced by the fcli command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants